// Created by Amit Mudgal for MicroStartegy Professional Services on 4/1/2014
package com.Amex.Crypto;

import com.microstrategy.utils.crypto.CryptoSessionKey;

public class Encryption {

	public static String Decrypt(String decrypt) {
	  try{
		CryptoSessionKey crypto = new CryptoSessionKey("Am3xMstr=rtsMx3mA");
		String text = crypto.decrypt(decrypt);
		return text;
	  }catch (Exception e) { return "ERROR";}
	}
	
	public static String Encrypt(String encrypt) {
		  try{
			CryptoSessionKey crypto = new CryptoSessionKey("Am3xMstr=rtsMx3mA");
			String text = crypto.encrypt(encrypt,null);
			return text;
		  }catch (Exception e) { return "ERROR";}
	}
	
	public static void main(String args[]){
		String pwd = "00000000095d13d96360cdac7804c217ee999f51436afa923356599d8eebae1147868242b0e77efc304755b94e822d26";
		String resPwd = Decrypt(pwd);
		System.out.println(resPwd);
	}
	
}
